import { Modal } from '@/common/components'
import React, { useImperativeHandle, useState } from 'react'
import styles from './index.module.less'

// interface RefundNoticePropsType {
//   visible: boolean,
//   onClose: () => void,
// }
export type RefundNoticeModalRefType = {
  open: () => void,
}

const RefundNoticeModal: React.ForwardRefRenderFunction<RefundNoticeModalRefType, {}> = (_props: {}, ref) => {
  const [visible, setVisible] = useState(false)

  useImperativeHandle(ref, () => ({
    open: () => setVisible(true),
  }), [])

  return (
    <Modal visible={visible} className={styles.modal}>
      <div className={styles.header}>
      退改签须知
      </div>
      <div className={styles.content}>
        
        
        <div className={styles.mt16}>
          <span style={{ color: 'black', display: 'inline-block' }}>
          </span>
          <span style={{ color: 'var(--color-main)', display: 'inline-block' }}>
          已付款订单不支持退票和改签！
          </span>
        </div>
      </div>
      <div className={styles.footer}>
        <div className={styles.cancel} onClick={() => setVisible(false)}>关闭</div>
      </div>
    </Modal>
  )
}

export default React.forwardRef<RefundNoticeModalRefType, {}>(RefundNoticeModal)